package org.forum.service.impl;

import org.forum.dao.UserDao;
import org.forum.domain.User;
import org.forum.service.UserAuthorityService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class UserAuthorityServiceImpl implements UserAuthorityService{
	
	Logger logger = LoggerFactory.getLogger(UserAuthorityServiceImpl.class);
	
	private UserDao<User> userDao;

	public UserDao<User> getUserDao() {
		return userDao;
	}
	
	public void setUserDao(UserDao<User> userDao) {
		this.userDao = userDao;
	}

	@Override
	public User verifyPassword(User user) {
		return userDao.findUserByUsernameAndPassword(user);
	}

	@Override
	public User findUserByUsername(User user) {
		return  userDao.findUserByUsername(user);
	}

}
